import { Mod } from '../src/utils/model';
import { Random } from 'mockjs';
const model = new Mod('dynamics');
export default {
  async up() {
    const array = [];
    for (let i = 0; i < 100; i++) {
      array.push({
        tagnames: ['apple'],
        openid: Random.word(28, 28),
        author: Random.cname(),
        article: Random.cword(20, 64),
        tomato: 11,
        background: '/static/logo.png',
        head_image: 'https://img.yzcdn.cn/vant/cat.jpeg',
        ty_symbol: true,
      });
    }
    await model.insertMany(array);
  },
  async down() {
    await model.deleteMany({
      ty_symbol: true,
    });
  },
};
